package com.asktgapp.eventbus;

import org.greenrobot.eventbus.EventBus;

/**
 * time:2018/1/24
 * Create By ZhaoKai
 * Email: dczk@foxmail.com
 * Description:
 */

public class WebEvent {

    private String url;
    private boolean isGoBack;

    public boolean isGoBack() {
        return isGoBack;
    }

    public void setGoBack(boolean goBack) {
        isGoBack = goBack;
    }

    public WebEvent(String type,boolean isGoBack) {
        this.url = type;
        this.isGoBack = isGoBack;
    }

    public String getUrl() {
        return url == null ? "" : url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public static void postEvent(String a,boolean isGoBack) {
        EventBus.getDefault().post(new WebEvent(a,isGoBack));
    }
}
